package com.bionic.ce.connections;

import com.bionic.ce.dao.IBankaccDAO;
import com.bionic.ce.dao.ICurrencyDAO;
import com.bionic.ce.dao.IOfficialbankrateDAO;
import com.bionic.ce.dao.IQueryDAO;
import com.bionic.ce.dao.ISystemaccDAO;
import com.bionic.ce.dao.IUserDAO;
import com.bionic.ce.daoimplementation.MySQLBankaccDAO;
import com.bionic.ce.daoimplementation.MySQLCurrencyDAO;
import com.bionic.ce.daoimplementation.MySQLOfficialbankrateDAO;
import com.bionic.ce.daoimplementation.MySQLQueryDAO;
import com.bionic.ce.daoimplementation.MySQLSystemaccDAO;
import com.bionic.ce.daoimplementation.MySQLUserDAO;
import java.sql.Connection;

public class MySQLDAOFactory extends DAOFactory {

    public static Connection createConnection() {
    return ConnectionManager.getInstance().getConnection(); 
    }
    
    public static void freeConnection(Connection conn) {
    ConnectionManager.getInstance().freeConnection(conn); 
    }
    
    public  IBankaccDAO getBankaccDAO(){
    return new MySQLBankaccDAO();
    }
    
    public  ICurrencyDAO getCurrencyDAO(){
    return new MySQLCurrencyDAO();
    }

    public  IOfficialbankrateDAO getOfficialbankrateDAO(){
    return new MySQLOfficialbankrateDAO();
    }

    public  IQueryDAO getQueryDAO(){
    return new MySQLQueryDAO();
    }

    public  ISystemaccDAO getSystemaccDAO(){
    return new MySQLSystemaccDAO();
    }

    public  IUserDAO getUserDAO(){
    return new MySQLUserDAO();
    }   
}